/**
 * @Author: zhouge
 * @Description: 发现界面的制作
 * @Date: Created in 20:50 2020-09-28
 * @Modified By:
 **/

import 'package:flutter/material.dart';
import './full_width_icon_button.dart';
import '../config.dart' show AppColors;

class DiscoverPage extends StatefulWidget {
  @override
  _DiscoverPageState createState() => _DiscoverPageState();
}

class _DiscoverPageState extends State<DiscoverPage> {

  // 控件之间的间隙
  static const SEPARATE_SIZE = 20.0;

  @override
  Widget build(BuildContext context) {
    // 使用于较少的数列，会在布局初始化的时候全部加载。
    return Container(
      color: Color(AppColors.BackgroundColor),
      child: SingleChildScrollView(
        child: Column(
          children: <Widget>[
            SizedBox(height: SEPARATE_SIZE,),
            FullWidthIconButton(
              iconPath: 'assets/images/ic_social_circle.png',
              title:'朋友圈',
              onPressed: (){},
            ),
              SizedBox(height: SEPARATE_SIZE,),
            FullWidthIconButton(
              iconPath: 'assets/images/ic_quick_scan.png',
              title:'扫一扫',
              showDivider: true,
              onPressed: (){},
            ),
            FullWidthIconButton(
              iconPath: 'assets/images/ic_shake_phone.png',
              title:'摇一摇',
              onPressed: (){},
            ),
            SizedBox(height: SEPARATE_SIZE,),
            FullWidthIconButton(
              iconPath: 'assets/images/ic_feeds.png',
              title:'看一看',
              onPressed: (){},
            ),
            FullWidthIconButton(
              iconPath: 'assets/images/ic_quick_search.png',
              title:'搜一搜',
              onPressed: (){},
            ),
            SizedBox(height: SEPARATE_SIZE,),
            FullWidthIconButton(
              iconPath: 'assets/images/ic_people_nearby.png',
              title:'附近的人',
              onPressed: (){},
            ),
            FullWidthIconButton(
              iconPath: 'assets/images/ic_bottle_msg.png',
              title:'漂流瓶',
              onPressed: (){},
            ),
            SizedBox(height: SEPARATE_SIZE,),
            FullWidthIconButton(
              iconPath: 'assets/images/ic_shopping.png',
              title:'购物',
              onPressed: (){},
            ),
            FullWidthIconButton(
              iconPath: 'assets/images/ic_game_entry.png',
              title:'游戏',
              onPressed: (){},
            ),
            SizedBox(height: SEPARATE_SIZE,),
            FullWidthIconButton(
              iconPath: 'assets/images/ic_mini_program.png',
              title:'小程序',
              onPressed: (){},
            ),
          ],
        ),
      ),
    );
  }
}
